package com.fd.service.impl;

import com.fd.bean.User;
import com.fd.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fd.service.UserService;

import java.util.List;
import java.util.Map;

@Service
public class UserServiceImpl implements UserService {

    //    注入MyBatis的Dao对象
    @Autowired
    private UserDao userDao;

    @Override
    public List<User> getUserAll() {
        return userDao.getUserAll();
    }

    @Override
    public User getUser(Integer id) {
        return userDao.getUser(id);
    }

    @Override
    public int updateUser(User user) {
        return userDao.updateUser(user);
    }

    @Override
    public int deleteUser(int id) {
        return userDao.deleteUser(id);
    }

    @Override
    public int insertUser(User user) {
        return userDao.insertUser(user);
    }



}
